package com.takanafu.haru.code.builtins{
	import com.takanafu.haru.code.CodeBase;
	import com.takanafu.haru.code.CodeString;
	import com.takanafu.haru.code.UseCallback;
	
	import mx.collections.ArrayCollection;
	import mx.controls.Alert;
	
	public class HaruAlert extends AbstractBuitin{
		public function HaruAlert(){
			super(2);
		}
		override public function exec(params:ArrayCollection):CodeBase{
			var msg:CodeString = params.getItemAt(0) as CodeString;
			var ttl:CodeString = params.getItemAt(1) as CodeString;
			
			Alert.show(msg != null ? msg.toString() : "message",ttl != null ? ttl.toString() : "title",Alert.OK,null,thread.onEnterFrame);
			
			return new UseCallback();
		}
	}
}